package main

import (
	"fmt"
	"net/http"
	//"time"
	"io/ioutil"
)

func handler2(w http.ResponseWriter, r *http.Request) {
	fmt.Println(r.Host)
	//time.Sleep(time.Second * 100)
	defer r.Body.Close()

	body, err := ioutil.ReadAll(r.Body)

	if err != nil {
		// handle error
	}
	fmt.Println(string(body))
}

func main() {
	http.HandleFunc("/", handler2)
	http.ListenAndServe(":8000", nil)
}
